package io.renren.wechat.service.suite.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.io.Serializable;

@Data
public class SuiteAccessTokenResponse implements Serializable {

    @JSONField(name = "errcode")
    private Integer errCode;

    @JSONField(name = "errmsg")
    private String errMsg;

    @JSONField(name = "suite_access_token")
    private String suiteAccessToken;

    @JSONField(name = "expires_in")
    private Integer expiresIn;

    public boolean isError() {
        return errCode != null && 0 != errCode;
    }
}
